export default {
  // 增加联系人列表中数据
  savecontact (state, contact) {
    if(contact.isDefault){
      state.contact.forEach(el => { el.isDefault = false});
    }
    contact.id =  state.contact.length+1
    state.contact.unshift(contact)
  },
  // 选择联系人列表中数据到订单页
  choseContact (state, becontact) {
    state.preveContact = becontact
  },
  //更改联系人
  editcontact (state, { saveinfo, saveindex }) {
    state.contact[saveindex] = saveinfo
  }
}
